home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text.html.parser;
-
- import java.util.Hashtable;
-
- public final class Entity implements DTDConstants {
- public String name;
- public int type;
- public char[] data;
- static Hashtable entityTypes = new Hashtable();
-
- static {
- entityTypes.put("PUBLIC", new Integer(10));
- entityTypes.put("CDATA", new Integer(1));
- entityTypes.put("SDATA", new Integer(11));
- entityTypes.put("PI", new Integer(12));
- entityTypes.put("STARTTAG", new Integer(13));
- entityTypes.put("ENDTAG", new Integer(14));
- entityTypes.put("MS", new Integer(15));
- entityTypes.put("MD", new Integer(16));
- entityTypes.put("SYSTEM", new Integer(17));
- }
-
- public Entity(String var1, int var2, char[] var3) {
- this.name = var1;
- this.type = var2;
- this.data = var3;
- }
-
- public char[] getData() {
- return this.data;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getString() {
- return new String(this.data, 0, this.data.length);
- }
-
- public int getType() {
- return this.type & '\uffff';
- }
-
- public boolean isGeneral() {
- return (this.type & 65536) != 0;
- }
-
- public boolean isParameter() {
- return (this.type & 262144) != 0;
- }
-
- public static int name2type(String var0) {
- Integer var1 = (Integer)entityTypes.get(var0);
- return var1 == null ? 1 : var1;
- }
- }
-